<script type="text/javascript">

	$(document).ready(function(){ldelim} 
		// for redirect url actions
		 $("#redirect").click(function () {ldelim} 
		 	if ($(this).attr("checked")){ldelim}
	      		$(this).attr("value","1");
	      		$("#to_url").attr("disabled","");
			{rdelim}else{ldelim}
				$(this).attr("value","0");
	      		$("#to_url").attr("value","");
	      		$("#to_url").attr("disabled","disabled");				
			{rdelim}
	    {rdelim});
	    
		$("#save_new_page").submit(function() {ldelim}
			return__ = true;
				
			if ($("#page_name").val() == "") {ldelim}
				$("#page_name__").text("Proszę podać nazwę strony!").show().fadeOut(2000);
				return false;
			{rdelim}else{ldelim}
				return__ = (return__) ? true : false ;
			{rdelim}
			
			if ($("#page_url").val() == "") {ldelim}
				$("#page_url__").text("Proszę podać adres url!").show().fadeOut(2000);
				return false;
			{rdelim}else{ldelim}
				return__ = (return__) ? true : false ;
			{rdelim}
			
			if ($("#redirect").val() == "1" && $("#to_url").val() == "" ){ldelim}
				$("#to_url__").text("Proszę podać adres url!").show().fadeOut(2000);
				return false;
			{rdelim}else{ldelim}
				return__ = (return__) ? true : false ;
			{rdelim}
						
			return return__;
	    {rdelim});
	    
	 
	{rdelim});

</script>

<!-- dane strony -->
<form action="{$smarty.const.HTTP_URL}zarzadzaj_stronami,Panel_Panel,savenewpage.html" method="post" name="save_new_page" id="save_new_page" onreset="document.location='{$smarty.const.HTTP_URL}zarzadzaj_stronami.html'">
<!-- dispatcher info -->
<input type="hidden" name="id_p_page" value="{$id_p_page|default:0}"/>
<h2>Dane strony</h2>
<table class="setup">
	<tr>
		<th>Język</th>
		<td>{html_options name=id_lang id=page_language_select options=$smarty.const.LANGU|unserial selected=$newpage.id_lang } </td>
		<td class="no_border red"></td>
	</tr>
	<tr>		
		<th>Nazwa strony</th>
		<td><input name="page_name" id="page_name" value="" /></td>
		<td class="no_border red" id="page_name__"></td>
	</tr>
	<tr>		
		<th>Grupa</th>
		<td>
			{if $id_p_page eq 0} 
			{html_options name="id_grup" options=$smarty.const.UMENU|unserial selected=$id_p_grup}
			{else}
			
			<input type="text" name="id_grup"  id="id_grup" value="{$id_p_grup}"  readonly="readonly"/>
			{/if}
		</td>
		<td class="no_border red" ></td>
	</tr>
	<tr>		
		<th>Przekieruj</th>
		<td>
			<input type="checkbox" name="redirect" id="redirect" value="0"/>
		</td>
		<td class="no_border red" ></td>
	</tr>	
	<tr>		
		<th>Adres</th>
		<td>
			<input type="text" name="to_url" id="to_url" value="" {if $page.redirect ne 1}disabled="disabled"{/if}/>
		</td>
		<td class="no_border red" id="to_url__"></td>
	</tr>
	<tr>		
		<th>Styl</th>
		<td>
			{html_options name=theme options=$smarty.const.PSTYL|unserial }
		</td>
		<td class="no_border red" ></td>
	</tr>
	<tr>		
		<th>Zablokuj strone</th>
		<td>
			<input type="checkbox" name="plock" value="0" onclick="if(this.checked){ldelim} this.value = 1 {rdelim}else{ldelim}this.value = 0{rdelim}"/>
		</td>
		<td class="no_border red" ></td>
	</tr>
	<tr>
	<th>Napisz kilka słów o tej stronie</th><td><textarea  name="description" rows="3" cols="30"></textarea></td>
	</tr>
	<tr>
	<th>Napisz kluczowe słowa harakteryzujące ta stronę np: firma,materiały,itd...</th><td><textarea  name="keywords" rows="3" cols="30"></textarea></td>
	</tr>				
	<tr>		
		<th class="no_border"></th>
		<td class="no_border">
			<input type="submit" class="button" value="Dodaj stronę">
			<input type="reset" class="button" value="Zrezygnuj" >
		</td>
		<td class="no_border red" ></td>
	</tr>
</table>
</form>
<form>

<!-- $smarty.const.SECTI|unserial|@debug_print_var} -->
<!-- $sections|@debug_print_var} --> 